<?php
/**
 * Class for customize error handling of cakephp
 *
 */
class AppError extends ErrorHandler {
	/**
	 * Override dispatchMethod for adding hideBanner variable to views
	 *
	 * @param string $method
	 * @param array $params
	 * @return mixed|void
	 */
	function dispatchMethod($method, $params = array()) {
		Configure::load('general');
		$this->controller->set(array(
			'hideBanner' => true,
		));
		parent::dispatchMethod($method, $params);
	}
}